<template>
  <div>
    <!-- 计划任务 -->
    <el-card class="card">
      <div>计划任务</div>
      <el-radio-group v-model="radioState" style="margin-top: 10px">
        <el-radio value="1" border>日循环</el-radio>
        <el-radio value="2" border>周循环</el-radio>
        <el-radio value="3" border>月循环</el-radio>
      </el-radio-group>

      <DailyCycle v-if="radioState == '1'" />
      <Week v-if="radioState == '2'" />
      <Month v-if="radioState == '3'" />
    </el-card>
  </div>
</template>

<script setup lang="ts">
import { ref, reactive, onMounted, provide } from "vue";
import { useRoute } from "vue-router";
import DailyCycle from "@/components/market/schedule/DailyCycle.vue";
import Week from "@/components/market/schedule/Week.vue";
import Month from "@/components/market/schedule/Month.vue";

// const route = useRoute();
//单选框选中状态
const radioState = ref("1");

// //任务列表
// const taskList = ref<AddTaskList[]>([]);
// //获取老人任务列表
// const getTaskData = async (id: number) => {
//   let res = await getTaskList(id);

//   taskList.value = res.list;
//   console.log("098", taskList.value);
// };

// //数据渲染表格

// onMounted(() => {
//   getTaskData(Number(route.query.id));
// });
</script>

<style scoped>
.card {
  width: 98%;
  margin: 0 auto;
  margin-top: 10px;
}
</style>
